//
// Created by yangdian on 2020/5/20.
//

#include "GLVideoView.h"
#include "XLog.h"
#include "XTexture.h"

void GLVideoView::SetRender(void *win)
{
    view = win;
}

void GLVideoView::Render(XData data)
{
    if (!view)
    {
        XLOGE("view is null!");
        return;
    }
    if (!txt)
    {
        txt = XTexture::Create();
        txt->Init(view, (XTextureType)data.format);
    }
    txt->Draw(data.datas, data.width, data.height);
}
